package com.alibaba.dubbo.common.header;

import java.util.Map;

import com.alibaba.dubbo.common.HeaderProvider;

public class HeaderProviderWrapper implements HeaderProvider {
	
	private HeaderProvider provider;
	public HeaderProviderWrapper(HeaderProvider provider){
		this.provider = provider;
	}

	@Override
	public Map<String, String> getHeaders() {
		if(provider == null) return null;
		return provider.getHeaders();
	}


	@Override
	public void setHeaders(Map<String, String> values) {
		if(this.provider != null){
			this.provider.setHeaders(values);
		}
	}
}
